<template>
  <Dialog title="详情" v-model="dialogVisible" width="80%" center>
    <ActivityInfo :data="data" />
    <AuditsInfo :data="data" />
    <!-- <el-tabs>
      <el-tab-pane label="活动信息" lazy>
        <ActivityInfo :data="data" />
      </el-tab-pane>
      <el-tab-pane label="报名记录" lazy>
        <EnrollmentRecords :data="data" />
      </el-tab-pane>
      <el-tab-pane label="核销记录" lazy>
        <WriteOffRecords :data="data" />
      </el-tab-pane>
    </el-tabs> -->
  </Dialog>
</template>
<script setup lang="ts">
import * as ActivityInfoApi from '@/api/blind/activityInfo'
import ActivityInfo from './components/ActivityInfo.vue'
import AuditsInfo from './components/AuditsInfo.vue'
// import EnrollmentRecords from './components/EnrollmentRecords.vue'
// import WriteOffRecords from './components/WriteOffRecords.vue'

const dialogVisible = ref(false) // 弹窗的是否展示
const data = ref<ActivityInfoApi.ActivityInfoVO>({} as ActivityInfoApi.ActivityInfoVO)

/** 打开弹窗 */
const open = async (id?: number) => {
  dialogVisible.value = true
  // 修改时，设置数据
  if (id) {
    data.value = await ActivityInfoApi.getActivityInfo(id)
  }
}
defineExpose({ open }) // 提供 open 方法，用于打开弹
</script>
<style scoped lang="scss">
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
